----------------------------------------------------------------------------------------------------------------------------
       log:  Z:\interactionmodels\results\magnitudefig_FIG2.log
  log type:  text
 opened on:  11 Jan 2007, 16:01:49

. *     ***************************************************************** *;
. *     ***************************************************************** *;
. *       File-Name:      magnitudefig_FIG2.do                            *;
. *       Date:           01/09/2007                                      *;
. *       Author:         MRG                                             *;
. *       Purpose:        Creates figure 2 showing effect of magnitude    *;
. *                       on number of parties using MSG data             *;
. *       Input File:     STATA_mozaffar.dta, golder1.dta                 *;
. *       Output File:    magnitudefig_FIG2.log                           *;
. *       Data Output:    none                                            *;
. *       Previous file:                                                  *;
. *       Machine:                                                        *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. set mem 10m;
(10240k)

. use getdata\STATA_mozaffar.dta;

. set obs 100;
obs was 62, now 100

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *           Effect of Magnitude on Number of Legislative Parties        *;
. *               MSG data, FIGURE 2 (left) in paper                      *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. regress legparties  fragmentation concentration logmag10 frag_conc logmag10_frag  
> logmag10_conc logmag10_frag_conc proximity prescandidate prox_prescandidate, robust;

Regression with robust standard errors                 Number of obs =      62
                                                       F( 10,    51) =   18.12
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.7566
                                                       Root MSE      =  .81255

------------------------------------------------------------------------------
             |               Robust
  legparties |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
fragmentat~n |  -.3061517   .1244102    -2.46   0.017    -.5559156   -.0563877
concentrat~n |   .1077863   .2720849     0.40   0.694    -.4384468    .6540195
    logmag10 |   .6576745   .4536982     1.45   0.153    -.2531626    1.568512
   frag_conc |   .1468926   .0486345     3.02   0.004     .0492546    .2445305
logmag10_f~g |   -.072974   .1039821    -0.70   0.486    -.2817268    .1357788
logmag10_c~c |  -.8640806   .3508728    -2.46   0.017    -1.568487    -.159674
~0_frag_conc |     .17936   .0804572     2.23   0.030     .0178355    .3408846
   proximity |  -.5792874   .4341616    -1.33   0.188    -1.450903    .2923284
prescandid~e |   .4972876   .1789268     2.78   0.008      .138077    .8564981
prox_presc~e |   .0357922   .2703231     0.13   0.895     -.506904    .5784883
       _cons |   1.274294   .3003618     4.24   0.000     .6712925    1.877295
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *       Create x-axis for modifying variable (FRAGMENTATION) = JH       *;
. *     ****************************************************************  *;
. generate JH=((_n-1)/10);

.     replace JH=. if _n>100;
(0 real changes made)

. generate str1 txt="*";

. *     ****************************************************************  *;
. *       Grab elements of the matrix required for calculating            *;
. *       conditional coefficients and standard errors.                   *;
. *     ****************************************************************  *;
. matrix b=e(b);

. matrix V=e(V);

. scalar b1=b[1,1];

. scalar b2=b[1,2];

. scalar b3=b[1,3];

. scalar b4=b[1,4];

. scalar b5=b[1,5];

. scalar b6=b[1,6];

. scalar b7=b[1,7];

. scalar b8=b[1,8];

. scalar b9=b[1,9];

. scalar b10=b[1,10];

. scalar varb1=V[1,1];

. scalar varb2=V[2,2];

. scalar varb3=V[3,3];

. scalar varb4=V[4,4];

. scalar varb5=V[5,5];

. scalar varb6=V[6,6];

. scalar varb7=V[7,7];

. scalar varb8=V[8,8];

. scalar varb9=V[9,9];

. scalar varb10=V[10,10];

. scalar covb1b4=V[1,4];

. scalar covb1b5=V[1,5];

. scalar covb1b7=V[1,7];

. scalar covb3b5=V[3,5];

. scalar covb3b6=V[3,6];

. scalar covb3b7=V[3,7];

. scalar covb5b6=V[5,6];

. scalar covb6b7=V[6,7];

. scalar covb4b5=V[4,5];

. scalar covb4b7=V[4,7];

. scalar covb5b7=V[5,7];

. scalar covb8b10=V[5,7];

. set more off;

. scalar list b1 b2 b3 b4 b5 b6 b7 varb1 varb2 varb3 varb4 varb5 varb6 varb7 
>             covb1b4 covb1b5 covb1b7 covb4b5 covb4b7 covb5b7;
        b1 = -.30615166
        b2 =  .10778635
        b3 =  .65767451
        b4 =  .14689255
        b5 =   -.072974
        b6 = -.86408064
        b7 =  .17936003
     varb1 =  .01547791
     varb2 =  .07403019
     varb3 =  .20584204
     varb4 =  .00236532
     varb5 =  .01081228
     varb6 =  .12311175
     varb7 =  .00647336
   covb1b4 = -.00416635
   covb1b5 = -.00751984
   covb1b7 =  .00293553
   covb4b5 =  .00356405
   covb4b7 =   -.002505
   covb5b7 = -.00740659

. *     ****************************************************************  *;
. *         Create full range of conditional coefficients for logmag      *;
. *     ****************************************************************  *;
. gen conb0=b3+b5*JH+b6*0+b7*(0*JH) if _n<100;
(1 missing value generated)

. gen conb1=b3+b5*JH+b6*1+b7*(1*JH) if _n<100;
(1 missing value generated)

. gen conb2=b3+b5*JH+b6*2+b7*(2*JH) if _n<100;
(1 missing value generated)

. gen conb3=b3+b5*JH+b6*3+b7*(3*JH) if _n<100;
(1 missing value generated)

. gen conb4=b3+b5*JH+b6*4+b7*(4*JH) if _n<100;
(1 missing value generated)

. set more off;

. *     ****************************************************************  *;
. *           Create full range of conditional standard errors            *;
. *     ****************************************************************  *;
. gen conse0=sqrt(varb3
>                 + varb5*JH^2 + varb6*(0^2) + varb7*(JH^2)*(0^2)
>                 + 2*JH*covb3b5 + 2*0*covb3b6 + 2*0*JH*covb3b7 + 2*0*JH*covb5b6
>                 + 2*0*(JH^2)*covb5b7) + 2*(0^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 gen conse1=sqrt(varb3
>                 + varb5*JH^2 + varb6*(1^2) + varb7*(JH^2)*(1^2)
>                 + 2*JH*covb3b5 + 2*1*covb3b6 + 2*1*JH*covb3b7 + 2*1*JH*covb5b6
>                 + 2*1*(JH^2)*covb5b7) + 2*(1^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 gen conse2=sqrt(varb3
>                 + varb5*JH^2 + varb6*(2^2) + varb7*(JH^2)*(2^2)
>                 + 2*JH*covb3b5 + 2*2*covb3b6 + 2*2*JH*covb3b7 + 2*2*JH*covb5b6
>                 + 2*2*(JH^2)*covb5b7) + 2*(2^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 gen conse3=sqrt(varb3
>                 + varb5*JH^2 + varb6*(3^2) + varb7*(JH^2)*(3^2)
>                 + 2*JH*covb3b5 + 2*3*covb3b6 + 2*3*JH*covb3b7 + 2*3*JH*covb5b6
>                 + 2*3*(JH^2)*covb5b7) + 2*(3^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 gen conse4=sqrt(varb3
>                 + varb5*JH^2 + varb6*(4^2) + varb7*(JH^2)*(4^2)
>                 + 2*JH*covb3b5 + 2*4*covb3b6 + 2*4*JH*covb3b7 + 2*4*JH*covb5b6
>                 + 2*4*(JH^2)*covb5b7) + 2*(4^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 set more off;

. *     ****************************************************************  *;
. *                           Create t statistics                         *;
. *     ****************************************************************  *;
. gen t0=conb0/conse0;
(1 missing value generated)

. gen t1=conb1/conse1;
(1 missing value generated)

. gen t2=conb2/conse2;
(1 missing value generated)

. gen t3=conb3/conse3;
(1 missing value generated)

. gen t4=conb4/conse4;
(1 missing value generated)

. *     ****************************************************************  *;
. *       Generate a variable equal to conditional betas                  *;
. *     ****************************************************************  *;
. gen consb0=conb0;
(1 missing value generated)

. gen consb1=conb1;
(1 missing value generated)

. gen consb2=conb2;
(1 missing value generated)

. gen consb3=conb3;
(1 missing value generated)

. gen consb4=conb4;
(1 missing value generated)

. *     ****************************************************************  *;
. *       Replace consb_ = missing if t score not bigger than cutoff      *;
. *     ****************************************************************  *;
. replace consb0 = . if abs(t0)<2.01;
(99 real changes made, 99 to missing)

. replace consb1 = . if abs(t1)<2.01;
(79 real changes made, 79 to missing)

. replace consb2 = . if abs(t2)<2.01;
(27 real changes made, 27 to missing)

. replace consb3 = . if abs(t3)<2.01;
(65 real changes made, 65 to missing)

. replace consb4 = . if abs(t4)<2.01;
(71 real changes made, 71 to missing)

. set textsize 100;

. *     ****************************************************************  *;
. *       Graph the effect of runoff on enpres conditional on eneg        *;
. *     ****************************************************************  *;
. graph twoway   line conb0 JH , clpattern(solid) clwidth(vthin)
>         ||  scatter consb0 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb1 JH , clpattern(solid) clwidth(vthin)
>         ||  scatter consb1 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb2 JH , clpattern(solid) clwidth(vthin)
>         ||  scatter consb2 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb3 JH , clpattern(solid) clwidth(vthin)
>         ||  scatter consb3 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)        
>         ||  ,   
>             ysize(6)
>             xsize(8)
>             xlabel(0 1 2 3 4 5 6 7 8 9 10, labsize(2.5)) 
>             ylabel(-2 -1 0 1 2 3, labsize(2.5))
>             yscale(noline)
>             xscale(noline)
>             yline(0, lcolor(black)) yline(-4 -3 -2 -1 1 2 3 4 5 6, lcolor(white)) 
>             xtitle("")
>             ytitle("")
>             xsca(titlegap(2))
>             ysca(titlegap(4.5))
>             text(2.9 2.7 "* indicates significance at the 95% level", justification(left) size(2.5))
>             legend(off)
>             scheme(s2mono) graphregion(fcolor(white))
>             graphregion(margin(r=28));

.      *     ****************************************************************  *;
. *                               Save Graph                              *;
. *     ****************************************************************  *;
. translate @Graph results\FIG2_LEFT_logmag_leg.wmf, replace;
(file Z:\interactionmodels\results\FIG2_LEFT_logmag_leg.wmf written in Windows Metafile format)

. list country year fragmentation concentration if fragmentation<1.7 & concentration>1.01 & concentration<2.99;

     +------------------------------------------+
     | country   year_nyu   fragme~n   concen~n |
     |------------------------------------------|
 13. | Comoros       1992       1.15       1.86 |
     +------------------------------------------+

. list country year fragmentation concentration if fragmentation<3.4 & concentration>2.01;

     +---------------------------------------------+
     |    country   year_nyu   fragme~n   concen~n |
     |---------------------------------------------|
 16. |   Djibouti       1992       1.96       2.61 |
 17. |   Djibouti       1997       1.96       2.61 |
 18. | Eq. Guinea       1993       1.91       2.85 |
 35. | Mozambique       1994       2.87       2.36 |
 36. | Mozambique       1999       2.87       2.36 |
     |---------------------------------------------|
 40. |      Niger       1993       2.19       2.13 |
 41. |      Niger       1995       2.19       2.13 |
 46. |    Senegal       1983       3.08       2.06 |
 47. |    Senegal       1988       3.08       2.06 |
 48. |    Senegal       1993       3.08       2.06 |
     |---------------------------------------------|
 49. |    Senegal       1998       3.08       2.06 |
     +---------------------------------------------+

. *     ****************************************************************  *;
. *       Overall there are 12 observations for which logmag seems to     *;
. *       have a significant negative effect on the number of legislative *;
. *       parties.                                                        *;
. *     ****************************************************************  *;
. drop JH conb0 conb1 conb2 conb3 conb4 consb0 consb1 consb2 consb3 consb4 
> conse0 conse1 conse2 conse3 conse4 t0 t1 t2 t3 t4 txt;

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Magnitude Figure for Legislative Parties                *;
. *               Golder data, FIGURE 2 (right) in paper                  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. clear;

. use getdata\golder1.dta;

. *     ****************************************************************  *;
. *                   Now do recode of concentration                      *;
. *     ****************************************************************  *;
.                      gen conc1 = concentration;
(38 missing values generated)

. replace conc1 = 3 if (fragmentation==1 & concentration==0);
(11 real changes made)

. gen frag_conc = fragmentation*conc1;
(38 missing values generated)

. gen logmag_conc1_nyu = logmag_nyu*conc1;
(38 missing values generated)

. gen frag_conc1_logmag_nyu = fragmentation*conc1*logmag_nyu;
(38 missing values generated)

. list if conc1>3 & conc1!=.;

     +-------------------------------------------------------------------------------------------------------------+
  2. | countr~u | year_nyu | dictat~u | avemag~u | concen~n | distri~u | elecpa~u | frag2_~u | frag_c.. | fragme~n |
     |    Benin |     1991 |        0 |    10.67 |     3.24 |        6 |     9.62 | 200.1672 |  25.4664 |     7.86 |
     |----------+----------+----------+----------+----------+----------+----------+----------+----------+----------|
     | fragme~2 | legpar~u | logmag.. | logmag.. | lo~2_nyu | logmag.. | ~rag_nyu | logmag.. | presca~u | prox_p~u |
     |    61.78 |     8.76 | 7.670493 |  473.883 | 146.2602 | 60.29007 | 18.60805 | 2.367436 |     4.29 |     4.29 |
     |-------------------------------------------------------------------------------------------------------------|
     |  proxim~u   |  seats_~u   |  uppers~u   |  uppert~u   |  conc1   |  frag_c~c   |  lo~1_nyu   |   fr~g_nyu   |
     |         1   |        64   |         0   |         0   |   3.24   |   25.4664   |  7.670493   |   60.29007   |
     +-------------------------------------------------------------------------------------------------------------+

     +-------------------------------------------------------------------------------------------------------------+
  3. | countr~u | year_nyu | dictat~u | avemag~u | concen~n | distri~u | elecpa~u | frag2_~u | frag_c.. | fragme~n |
     |    Benin |     1995 |        0 |     4.67 |     3.24 |       18 |    14.13 | 200.1672 |  25.4664 |     7.86 |
     |----------+----------+----------+----------+----------+----------+----------+----------+----------+----------|
     | fragme~2 | legpar~u | logmag.. | logmag.. | lo~2_nyu | logmag.. | ~rag_nyu | logmag.. | presca~u | prox_p~u |
     |    61.78 |     6.69 | 4.993355 | 308.4895 | 95.21281 | 39.24777 | 12.11351 | 1.541159 |     4.29 |    2.574 |
     |-------------------------------------------------------------------------------------------------------------|
     |  proxim~u   |  seats_~u   |  uppers~u   |  uppert~u   |  conc1   |  frag_c~c   |  lo~1_nyu   |   fr~g_nyu   |
     |        .6   |        84   |         0   |         0   |   3.24   |   25.4664   |  4.993355   |   39.24777   |
     +-------------------------------------------------------------------------------------------------------------+

     +-------------------------------------------------------------------------------------------------------------+
  4. | countr~u | year_nyu | dictat~u | avemag~u | concen~n | distri~u | elecpa~u | frag2_~u | frag_c.. | fragme~n |
     |    Benin |     1999 |        0 |      3.5 |     3.24 |       24 |    10.38 | 200.1672 |  25.4664 |     7.86 |
     |----------+----------+----------+----------+----------+----------+----------+----------+----------+----------|
     | fragme~2 | legpar~u | logmag.. | logmag.. | lo~2_nyu | logmag.. | ~rag_nyu | logmag.. | presca~u | prox_p~u |
     |    61.78 |     6.28 | 4.058952 | 250.7621 |  77.3957 | 31.90337 | 9.846718 | 1.252763 |     3.48 |     .696 |
     |-------------------------------------------------------------------------------------------------------------|
     |  proxim~u   |  seats_~u   |  uppers~u   |  uppert~u   |  conc1   |  frag_c~c   |  lo~1_nyu   |   fr~g_nyu   |
     |        .2   |        84   |         0   |         0   |   3.24   |   25.4664   |  4.058952   |   31.90337   |
     +-------------------------------------------------------------------------------------------------------------+

. replace conc1 = 3 if conc1>3 & conc1!=.;
(3 real changes made)

. regress legparties_nyu  fragmentation conc1 logmag_nyu 
>         frag_conc_nyu logmag_frag_nyu logmag_conc1_nyu 
>         frag_conc1_logmag_nyu proximity_nyu prescandidate_nyu 
>         prox_prescandidate_nyu, robust;

Regression with robust standard errors                 Number of obs =      62
                                                       F( 10,    51) =   16.36
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.7306
                                                       Root MSE      =  1.0854

------------------------------------------------------------------------------
             |               Robust
legparties~u |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
fragmentat~n |  -.0298498    .207579    -0.14   0.886     -.446582    .3868825
       conc1 |   .2905494   .2921525     0.99   0.325    -.2959712      .87707
  logmag_nyu |     .22859   .4699838     0.49   0.629    -.7149419    1.172122
frag_conc_~u |   .0129148    .071531     0.18   0.857    -.1306896    .1565193
logmag~g_nyu |  -.0705713   .0831744    -0.85   0.400    -.2375509    .0964083
logmag~1_nyu |  -.3249581   .2145426    -1.51   0.136    -.7556704    .1057541
frag_conc1~u |   .1127178   .0450304     2.50   0.016     .0223154    .2031201
proximity_~u |  -.6113184   .5871686    -1.04   0.303    -1.790109    .5674717
prescandid~u |   1.248725    .403605     3.09   0.003     .4384543    2.058996
prox_presc~u |  -.5032746   .3759861    -1.34   0.187    -1.258098     .251549
       _cons |   .3000681   1.105572     0.27   0.787    -1.919461    2.519597
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *       Create x-axis for modifying variable (FRAGMENTATION) = JH       *;
. *     ****************************************************************  *;
. generate JH=((_n-1)/10);

.     replace JH=. if _n>100;
(0 real changes made)

. generate str1 txt="*";

. *     ****************************************************************  *;
. *       Grab elements of the matrix required for calculating            *;
. *       conditional coefficients and standard errors.                   *;
. *     ****************************************************************  *;
. matrix b=e(b);

. matrix V=e(V);

. scalar b1=b[1,1];

. scalar b2=b[1,2];

. scalar b3=b[1,3];

. scalar b4=b[1,4];

. scalar b5=b[1,5];

. scalar b6=b[1,6];

. scalar b7=b[1,7];

. scalar b8=b[1,8];

. scalar b9=b[1,9];

. scalar b10=b[1,10];

. scalar varb1=V[1,1];

. scalar varb2=V[2,2];

. scalar varb3=V[3,3];

. scalar varb4=V[4,4];

. scalar varb5=V[5,5];

. scalar varb6=V[6,6];

. scalar varb7=V[7,7];

. scalar varb8=V[8,8];

. scalar varb9=V[9,9];

. scalar varb10=V[10,10];

. scalar covb1b4=V[1,4];

. scalar covb1b5=V[1,5];

. scalar covb1b7=V[1,7];

. scalar covb3b5=V[3,5];

. scalar covb3b6=V[3,6];

. scalar covb3b7=V[3,7];

. scalar covb5b6=V[5,6];

. scalar covb6b7=V[6,7];

. scalar covb4b5=V[4,5];

. scalar covb4b7=V[4,7];

. scalar covb5b7=V[5,7];

. scalar covb8b10=V[5,7];

. set more off;

. scalar list b1 b2 b3 b4 b5 b6 b7 varb1 varb2 varb3 varb4 varb5 varb6 varb7 
>             covb1b4 covb1b5 covb1b7 covb4b5 covb4b7 covb5b7;
        b1 = -.02984976
        b2 =  .29054938
        b3 =  .22858998
        b4 =  .01291483
        b5 = -.07057131
        b6 = -.32495813
        b7 =  .11271776
     varb1 =  .04308905
     varb2 =  .08535309
     varb3 =  .22088481
     varb4 =  .00511668
     varb5 =  .00691799
     varb6 =  .04602853
     varb7 =  .00202774
   covb1b4 =  -.0133517
   covb1b5 = -.01512561
   covb1b7 =  .00599018
   covb4b5 =  .00460479
   covb4b7 = -.00244396
   covb5b7 = -.00308362

. *     ****************************************************************  *;
. *         Create full range of conditional coefficients for logmag      *;
. *     ****************************************************************  *;
. gen conb0=b3+b5*JH+b6*0+b7*(0*JH) if _n<100;
(1 missing value generated)

. gen conb1=b3+b5*JH+b6*1+b7*(1*JH) if _n<100;
(1 missing value generated)

. gen conb2=b3+b5*JH+b6*2+b7*(2*JH) if _n<100;
(1 missing value generated)

. gen conb3=b3+b5*JH+b6*3+b7*(3*JH) if _n<100;
(1 missing value generated)

. gen conb4=b3+b5*JH+b6*4+b7*(4*JH) if _n<100;
(1 missing value generated)

. set more off;

. *     ****************************************************************  *;
. *           Create full range of conditional standard errors            *;
. *     ****************************************************************  *;
. gen conse0=sqrt(varb3
>                 + varb5*JH^2 + varb6*(0^2) + varb7*(JH^2)*(0^2)
>                 + 2*JH*covb3b5 + 2*0*covb3b6 + 2*0*JH*covb3b7 + 2*0*JH*covb5b6
>                 + 2*0*(JH^2)*covb5b7) + 2*(0^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 gen conse1=sqrt(varb3
>                 + varb5*JH^2 + varb6*(1^2) + varb7*(JH^2)*(1^2)
>                 + 2*JH*covb3b5 + 2*1*covb3b6 + 2*1*JH*covb3b7 + 2*1*JH*covb5b6
>                 + 2*1*(JH^2)*covb5b7) + 2*(1^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 gen conse2=sqrt(varb3
>                 + varb5*JH^2 + varb6*(2^2) + varb7*(JH^2)*(2^2)
>                 + 2*JH*covb3b5 + 2*2*covb3b6 + 2*2*JH*covb3b7 + 2*2*JH*covb5b6
>                 + 2*2*(JH^2)*covb5b7) + 2*(2^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 gen conse3=sqrt(varb3
>                 + varb5*JH^2 + varb6*(3^2) + varb7*(JH^2)*(3^2)
>                 + 2*JH*covb3b5 + 2*3*covb3b6 + 2*3*JH*covb3b7 + 2*3*JH*covb5b6
>                 + 2*3*(JH^2)*covb5b7) + 2*(3^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 gen conse4=sqrt(varb3
>                 + varb5*JH^2 + varb6*(4^2) + varb7*(JH^2)*(4^2)
>                 + 2*JH*covb3b5 + 2*4*covb3b6 + 2*4*JH*covb3b7 + 2*4*JH*covb5b6
>                 + 2*4*(JH^2)*covb5b7) + 2*(4^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 set more off;

. *     ****************************************************************  *;
. *                           Create t statistics                         *;
. *     ****************************************************************  *;
. gen t0=conb0/conse0;
(1 missing value generated)

. gen t1=conb1/conse1;
(1 missing value generated)

. gen t2=conb2/conse2;
(1 missing value generated)

. gen t3=conb3/conse3;
(1 missing value generated)

. gen t4=conb4/conse4;
(1 missing value generated)

. *     ****************************************************************  *;
. *       Generate a variable equal to conditional betas                  *;
. *     ****************************************************************  *;
. gen consb0=conb0;
(1 missing value generated)

. gen consb1=conb1;
(1 missing value generated)

. gen consb2=conb2;
(1 missing value generated)

. gen consb3=conb3;
(1 missing value generated)

. gen consb4=conb4;
(1 missing value generated)

. *     ****************************************************************  *;
. *       Replace consb_ = missing if t score not bigger than cutoff      *;
. *     ****************************************************************  *;
. replace consb0 = . if abs(t0)<2.01;
(99 real changes made, 99 to missing)

. replace consb1 = . if abs(t1)<2.01;
(99 real changes made, 99 to missing)

. replace consb2 = . if abs(t2)<2.01;
(61 real changes made, 61 to missing)

. replace consb3 = . if abs(t3)<2.01;
(45 real changes made, 45 to missing)

. replace consb4 = . if abs(t4)<2.01;
(36 real changes made, 36 to missing)

. set textsize 100;

. *     ****************************************************************  *;
. *       Graph the effect of runoff on enpres conditional on eneg        *;
. *     ****************************************************************  *;
. graph twoway   line conb0 JH , clpattern(solid) clwidth(vthin)
>         ||  scatter consb0 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb1 JH , clpattern(solid) clwidth(vthin)
>         ||  scatter consb1 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb2 JH , clpattern(solid) clwidth(vthin)
>         ||  scatter consb2 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb3 JH , clpattern(solid) clwidth(vthin)
>         ||  scatter consb3 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)        
>         ||  ,   
>             ysize(6)
>             xsize(8)
>             xlabel(0 1 2 3 4 5 6 7 8 9 10, labsize(2.5)) 
>             ylabel(-2 -1 0 1 2 3, labsize(2.5))
>             yscale(noline)
>             xscale(noline)
>             yline(0, lcolor(black)) yline(-4 -3 -2 -1 1 2 3 4 5 6, lcolor(white)) 
>             xtitle("")
>             ytitle("")
>             xsca(titlegap(2))
>             ysca(titlegap(4.5))
>             text(2.9 2.7 "* indicates significance at the 95% level", justification(left) size(2.5))
>             legend(off)
>             scheme(s2mono) graphregion(fcolor(white))
>             graphregion(margin(r=28));

. *     ****************************************************************  *;
. *                               Save picture                            *;
. *     ****************************************************************  *;
. translate @Graph results\FIG2_RIGHT_logmag_leg.wmf, replace;
(file Z:\interactionmodels\results\FIG2_RIGHT_logmag_leg.wmf written in Windows Metafile format)

. drop JH conb0 conb1 conb2 conb3 conb4 consb0 consb1 consb2 consb3 consb4 
> conse0 conse1 conse2 conse3 conse4 t0 t1 t2 t3 t4 txt;

. log close;
       log:  Z:\interactionmodels\results\magnitudefig_FIG2.log
  log type:  text
 closed on:  11 Jan 2007, 16:02:00
----------------------------------------------------------------------------------------------------------------------------
